#ifndef __QUE_STRUCT_H__
#define __QUE_STRUCT_H__

#include <stdio.h>
#include <stdint.h>

#if 0
typedef struct 
{
    uint16_t count;
    uint16_t front;
    uint16_t rear;
}def_PT;
#endif

#if 0
typedef struct  
{
    //def_PT pt_buf;
    //uint16_t count;
    uint16_t front;
    uint16_t rear;

    int (*getQueCount)(void);
    void (*push_back)(u16Queue *q,uint16_t e);
    void (*pop_front)(u16Queue *q,uint16_t *e);

    void (*get_index)(u16Queue *q,uint16_t i,uint16_t* v);
    int (*length)(u16Queue *q);

    uint16_t* pData;
}__attribute__ ((packed)) u16Queue;
#endif

#if 1
//typedef struct u16Queue
typedef struct __attribute__ ((packed)) u16Queue
{
    //def_PT pt_buf;
    //uint16_t count;
    uint16_t front;
    uint16_t rear;

    int (*getQueCount)(void);
    void (*push_back)(struct u16Queue *q,uint16_t e);
    int (*pop_front)(struct u16Queue *q,uint16_t *e);

    int (*get_index)(struct u16Queue *q,uint16_t i,uint16_t* v);
    int (*length)(struct u16Queue *q);

    uint16_t* pData;
}defU16Que; //__attribute__ ((packed)) u16Queue;
#endif


#if 0
void entryItmU16Que(u16Queue *q,uint16_t e);
void exitItmU16Que(u16Queue *q,uint16_t *e);

void getItmU16Que(u16Queue *q,uint16_t i,uint16_t* v);
int getLenU16Que(u16Queue *q);
#endif

defU16Que* getRtcQuePt(void);
//int getRtcMaxCount(void);

#endif

